package com.siemens.industrial.model.admin;

import org.springframework.jdbc.core.RowMapper;

/**
 * Created by weig on 8/23/16.
 */
public class Event {
    private String eventId;
    private String eventName;
    private String eventType;
    private String eventDesc;
    private int enabled;

    private static final RowMapper<Event> rowMapper = (resultSet, i) -> {
        Event event = new Event();
        event.setEventId(resultSet.getString("event_id"));
        event.setEventName(resultSet.getString("event_name"));
        event.setEventType(resultSet.getString("event_type"));
        event.setEventDesc(resultSet.getString("event_desc"));
        event.setEnabled(resultSet.getInt("enabled"));
        return event;
    };

    public static RowMapper<Event> getRowMapper() {
        return rowMapper;
    }

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public String getEventName() {
        return eventName;
    }

    public void setEventName(String eventName) {
        this.eventName = eventName;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public String getEventDesc() {
        return eventDesc;
    }

    public void setEventDesc(String eventDesc) {
        this.eventDesc = eventDesc;
    }

    public int getEnabled() {
        return enabled;
    }

    public void setEnabled(int enabled) {
        this.enabled = enabled;
    }
}
